const formatTime = date => {
  const year = date.getFullYear()
  const month = date.getMonth() + 1
  const day = date.getDate()
  const hour = date.getHours()
  const minute = date.getMinutes()
  const second = date.getSeconds()

  return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
}

const formatNumber = n => {
  n = n.toString()
  return n[1] ? n : '0' + n
}






var hostUrl = "https://www.jikecity.xin/small/"

//加载中函数
function loading() {
  wx.showLoading({
    title: '玩命加载中...',
  })
  setTimeout(function () {
    wx.hideLoading();
  }, 300)
}

module.exports = {
  formatTime: formatTime,
  loading: loading,//页面提示正在加载中
  
  jktc_logo: "https://www.jikecity.xin/pic/link.png",
  // erweima: "https://www.jikecity.xin/public/code.jpg",
  erweima:"../images/pin1.png",//测试
  imgUrl: "/pages/images/",
  baseImgUrl: "../images/",//服务器图片地址，公共部分
  getNewsDetail: hostUrl + "shouxq/index",
  getTuijianNews: hostUrl + "shouxq/tuijian",

  shoueyNav: hostUrl + "index/index",//获取首页导航栏
  down_load: hostUrl + "zuopin/down_load",//首页下拉加载
  up_load: hostUrl + "zuopin/up_load",//首页上拉加载
  tuijian_newslist: hostUrl + "index/get_zuopin",//首页推荐下的新闻列表
  video_info: hostUrl + "zuopin/video_info",//视频新闻明细
  tuijian_audio: hostUrl + "shouyevideo/tuijian",//视频新闻推荐

  // 食堂接口
  


  zuopin_info: hostUrl + "zuopin/zuopin_info",//新闻名字初始数据
  guanzhu: hostUrl + "zuopin/guanzhu",//新闻明细加关注
  quguan: hostUrl + "zuopin/guanzhu_del",//新闻明细取消关注
  shoucang: hostUrl + "zuopin/shoucang",//新闻明细加收藏
  qu_shoucang: hostUrl + "zuopin/shoucang_del",//新闻明细取消收藏

  

  pindao_my: hostUrl + "pindao/index",//我的频道
  pindao_qita: hostUrl + "shouyeclass/jikeclass",//其他频道
  add_pindao: hostUrl + "pindao/addclass",//添加频道//
  del_pindao: hostUrl + "pindao/delclass",//删除频道
}


